\(\int \frac {1-x^2}{1-2 x^2+x^4} \, dx\) [88]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 2 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\text {arctanh}(x) \]

[Out]

arctanh(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {28, 21, 213} \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\text {arctanh}(x) \]

[In]

Int[(1 - x^2)/(1 - 2*x^2 + x^4),x]

[Out]

ArcTanh[x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps \begin{align*} \text {integral}& = \int \frac {1-x^2}{\left (-1+x^2\right )^2} \, dx \\ & = -\int \frac {1}{-1+x^2} \, dx \\ & = \tanh ^{-1}(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(19\) vs. \(2(2)=4\).

Time = 0.00 (sec) , antiderivative size = 19, normalized size of antiderivative = 9.50 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=-\frac {1}{2} \log (1-x)+\frac {1}{2} \log (1+x) \]

[In]

Integrate[(1 - x^2)/(1 - 2*x^2 + x^4),x]

[Out]

-1/2*Log[1 - x] + Log[1 + x]/2

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 3, normalized size of antiderivative = 1.50

method result size
default \(\operatorname {arctanh}\left (x \right )\) \(3\)
norman \(-\frac {\ln \left (x -1\right )}{2}+\frac {\ln \left (x +1\right )}{2}\) \(14\)
risch \(-\frac {\ln \left (x -1\right )}{2}+\frac {\ln \left (x +1\right )}{2}\) \(14\)
parallelrisch \(-\frac {\ln \left (x -1\right )}{2}+\frac {\ln \left (x +1\right )}{2}\) \(14\)

[In]

int((-x^2+1)/(x^4-2*x^2+1),x,method=_RETURNVERBOSE)

[Out]

arctanh(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13 vs. \(2 (2) = 4\).

Time = 0.26 (sec) , antiderivative size = 13, normalized size of antiderivative = 6.50 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\frac {1}{2} \, \log \left (x + 1\right ) - \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="fricas")

[Out]

1/2*log(x + 1) - 1/2*log(x - 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 12 vs. \(2 (2) = 4\).

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 6.00 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=- \frac {\log {\left (x - 1 \right )}}{2} + \frac {\log {\left (x + 1 \right )}}{2} \]

[In]

integrate((-x**2+1)/(x**4-2*x**2+1),x)

[Out]

-log(x - 1)/2 + log(x + 1)/2

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13 vs. \(2 (2) = 4\).

Time = 0.20 (sec) , antiderivative size = 13, normalized size of antiderivative = 6.50 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\frac {1}{2} \, \log \left (x + 1\right ) - \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="maxima")

[Out]

1/2*log(x + 1) - 1/2*log(x - 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 15 vs. \(2 (2) = 4\).

Time = 0.27 (sec) , antiderivative size = 15, normalized size of antiderivative = 7.50 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \]

[In]

integrate((-x^2+1)/(x^4-2*x^2+1),x, algorithm="giac")

[Out]

1/2*log(abs(x + 1)) - 1/2*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \frac {1-x^2}{1-2 x^2+x^4} \, dx=\mathrm {atanh}\left (x\right ) \]

[In]

int(-(x^2 - 1)/(x^4 - 2*x^2 + 1),x)

[Out]

atanh(x)